<?php

/*
 * *	FILE NAME: 	console.php 	(Last Update: 24 NOVEMBER 2011)
 * * 	DESCRIPTION: -
 * *	 
 * *	LICENSE:	
 * *
 * *	@programmer	-
 * *	@license	
 * *	@version	Release: @1.0@
 * *	@link		http://www.domain.com/package/packagename
 * *	@since		File available since Release 1.0
 * *
 */

$params = require(dirname(__FILE__) . '/params.' . YII_ENVIRONMENT . '.php');
$db = require(dirname(__FILE__) . '/database.' . YII_ENVIRONMENT . '.php');

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => $params['title'],
    'preload' => array('log'),
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.components.extended.*',
        'ext.libs.*',
        'ext.yii-mail.YiiMailMessage',
    ), //end import 
    'components' => array(
        /*
         * Database config 
         */
        'db' => array(
            //'class' => 'system.db.CDbConnection',
            'class' => 'application.extensions.PHPPDO.CPdoDbConnection',
            'pdoClass' => 'PHPPDO',
            'connectionString' => $db["dsn"],
            'username' => $db["username"],
            'password' => $db["password"],
            'charset' => $db["charset"],
            'tablePrefix' => $db["tablePrefix"],
            'emulatePrepare' => $db["emulatePrepare"], // needed for some MySQL installations
            //'enableProfiling' => true, //for database profiling
            'schemaCachingDuration' => 86400,
            'initSQLs' => array(
            ),
        ),
        /*
         * Site URL config
         */
        'urlManager' => array(
            'urlFormat' => 'path',
            'urlSuffix' => '.html',
            'showScriptName' => false,
            'rules' => require(dirname(__FILE__) . '/urlRules.php'),
        ),
        /*
         * Site Log config
         */
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => require(dirname(__FILE__) . '/logRoutes.' . YII_ENVIRONMENT . '.php'),
        ),
        /*
         * Messages config
         */
        'messages' => array(
            'class' => 'CPhpMessageSource',
        ),
        
        'clientScript'=>array(
            'class'=>'ext.packagecompressor.PackagesCommand',
        ),
        
        /*
         * php mailer
         */
        'mail' => array(
            'class' => 'ext.yii-mail.YiiMail',
            'transportType' => 'php',
            'viewPath' => 'application.views.edm',
            'logging' => true,
            'dryRun' => false,
        ),
        /**
         * 
         */
        'format' => array(
            'class' => 'Formatter',
            'currencySymbol' => $params['defaultCurrency'],
            'countryCode' => $params['defaultCountryCode'],
        ), //end format
    ),
    /** end components * */
    'params' => $params,
);